//
//  Mine_DraftsTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 2016/12/7.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "Mine_DraftsTableViewCell.h"

@implementation Mine_DraftsTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.content = [[UILabel alloc] init];
//    self.content.text = @"发日志";
    self.content.textColor = [UIColor blackColor];
    [self.contentView addSubview:self.content];
    
    self.time = [[UILabel alloc] init];
//    self.time.text = @"1分钟前";
    self.time.font = [UIFont systemFontOfSize:15.0f];
    self.time.textColor = [UIColor grayColor];
    [self.contentView addSubview:self.time];
    
    //
    self.view_Line = [[UIView alloc] init];
    self.view_Line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.view_Line];
    
    self.detail = [[UITextView alloc] init];
//    self.detail.text = @"ijkjkjkjskjdksjdkjskdskjdksdjk是经典款事件点击山东快书就打开就上课jskdskjdksdjk是经典款事jskdskjdksdjk是经典款事jskdskjdksdjk是经典款事";
    self.detail.userInteractionEnabled = NO;
    self.detail.font = [UIFont systemFontOfSize:15.0f];
    [self.contentView addSubview:self.detail];
    
    //68 202 126
    self.btn_send = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.btn_send setTitle:@"发送" forState:(UIControlStateNormal)];
    [self.btn_send setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
    self.btn_send.userInteractionEnabled = YES;
    self.btn_send.titleLabel.font = [UIFont systemFontOfSize:15.0f];
    [self.contentView addSubview:self.btn_send];
    self.btn_send.layer.cornerRadius = 5;
    self.btn_send.backgroundColor = [UIColor colorWithRed:68/255.0 green:202/255.0 blue:126/255.0 alpha:1.0f];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.content.frame = CGRectMake(15, 13, 70, 20);
    
    self.view_Line.frame = CGRectMake(0, 99, SCREEN_WIDTH, 1);
    
    self.time.frame = CGRectMake(CGRectGetMaxX(self.content.frame) + 0, 15, 70, 18);
    
    self.detail.frame = CGRectMake(10, CGRectGetMaxY(self.content.frame) + 3, SCREEN_WIDTH - 90, 45);
    
    self.btn_send.frame = CGRectMake(SCREEN_WIDTH - 10 - 60, CGRectGetMaxY(self.content.frame), 60, 30);
}




















@end
